﻿@model SAKS.ViewModels.PersonInfoCreateUpdateModel

@{
    ViewBag.Title = "编辑人员信息";
}

<h2>编辑人员信息</h2>

<link href="@Url.Content("~/Content/themes/base/validationEngine.jquery.css")" rel="stylesheet" type="text/css" />
<script src="@Url.Content("~/Scripts/jquery.validationEngine.js")" type="text/javascript"></script>
<script src="@Url.Content("~/Scripts/jquery.validationEngine-ch.js")" type="text/javascript"></script>
<script type="text/javascript">
    $(function () {
        $("form").validationEngine();
        $(".datepicker").datepicker({
            changeMonth: true,
            changeYear: true,
            yearRange: '1949:2010',
            dateFormat: 'yy-mm-dd',
            dayNames: ['周日', '周一', '周二', '周三', '周四', '周五', '周六'],
            dayNamesMin: ['日', '一', '二', '三', '四', '五', '六'],
            monthNamesShort: ['一', '二', '三', '四', '五', '六', '七', '八', '九', '十', '十一', '十二']
        });
        $("input[type='submit']").button();
    });

</script>
@using (Html.BeginForm()) {
    <fieldset>
        <legend>人员信息</legend>
        <input type="hidden" id="Id" name="Id" value="@Model.Id" />
                <script type="text/javascript">
                    $(function () {
                        $("input[type='radio']").click(function () {
                            if ($("#isMale").get(0).checked) {
                                $("#Gender").get(0).value = "Male";
                            } else {
                                $("#Gender").get(0).value = "Female";
                            }
                        });
                    });
        </script>
		
		<div class="editor-label">
			<label for="Name">姓名</label>
		</div>
		<div class="editor-field">
			<input class="validate[required]" id="Name" name="Name" type="text" value="@Model.Name" />
		</div>

		<div class="editor-label">
			性别
		</div>
		<div class="editor-field">
			<div id="gender-radio">
				<input class="validate[required] radio" type="radio" id="isMale" name="GenderGroup" value="false" @(Model.Gender == "Male" ? "checked='checked'":"")/><label for="isMaleR">男</label>
				<input class="validate[required] radio" type="radio" id="isFemale" name="GenderGroup"  value="false" @(Model.Gender == "Female" ? "checked='checked'":"")/><label for="isFemaleR">女</label>
                <input type="hidden" id="Gender" name="Gender" value="" />
			</div>
		</div>
		<div class="editor-label">
			<label for="BirthDay">出生年月</label>
		</div>
		<div class="editor-field">
		   <input class="validate[required,custom[date]] text-input datepicker" id="BirthDay" name="BirthDay" type="text" value="@Model.BirthDay" />
		</div>

		<div class="editor-label">
			 <label for="TechnicalTitle">技术头衔</label>
		</div>
		<div class="editor-field">
		   <input class="validate[required]" id="TechnicalTitle" name="TechnicalTitle" type="text" value="@Model.TechnicalTitle" />

		</div>

		<div class="editor-label">
			<label for="HighestDegree">最高学历</label>
		</div>
		<div class="editor-field">
			<input class="validate[required]" id="HighestDegree" name="HighestDegree" type="text" value="@Model.HighestDegree" />
		</div>
		<div class="editor-label">
			 <label for="Major">所学专业</label>
		</div>
		<div class="editor-field">
			<input class="validate[required] text-box single-line" id="Major" name="Major" type="text" value="@Model.Major" />
		</div>

		<div class="editor-label">
			 <label for="Occupation">从事专业</label>
		</div>
		<div class="editor-field">
			<input class="validate[required] text-box single-line" id="Occupation" name="Occupation" type="text" value="@Model.Occupation" />
		</div>

        <p>
            <input type="submit" value="保存" />
        </p>
    </fieldset>
}

<div>
    @Html.ActionLink("返回", "Index")
</div>

